package com.ggs.rg.ybjb.pojomodule.util.constants;

/**
 * @author: heeexy
 * @date: 2017/10/24 10:16
 */
public enum ErrorEnum {
    /*
     * 错误信息
     * 枚举中这些常量其实就相当于调用了枚举的构造方法
     * 并给枚举中的定义的变量赋值
     * */
    E_100("100", "其他异常"),
    E_400("400", "请求处理异常，请稍后再试"),
    E_500("500", "请求方式有误,请检查 GET/POST"),
    E_501("501", "请求路径不存在"),
    E_502("502", "权限不足"),
    E_503("503", "注册失败"),
    E_10008("10008", "角色删除失败,尚有用户属于此角色"),
    E_10009("10009", "账户已存在"),
    E_10010("10010", "账号/密码错误"),
    E_30001("30001","添加失败"),
    E_30002("30002","JSONObject为空"),
    E_20011("20011", "登陆已过期,请重新登陆"),
    E_10012("10012", "账号格式异常"),
    E_40001("40001","发生熔断"),
    E_90003("90003", "缺少必填参数");


    private final String errorCode;

    private final String errorMsg;

    ErrorEnum(String errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }
}
